import service from '@/utils/request'

// @Tags UserComment
// @Summary 创建评论信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UserComment true "创建评论信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /userComment/createUserComment [post]
export const createUserComment = (data) => {
  return service({
    url: '/userComment/createUserComment',
    method: 'post',
    data
  })
}

// @Tags UserComment
// @Summary 删除评论信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UserComment true "删除评论信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /userComment/deleteUserComment [delete]
export const deleteUserComment = (params) => {
  return service({
    url: '/userComment/deleteUserComment',
    method: 'delete',
    params
  })
}

// @Tags UserComment
// @Summary 批量删除评论信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除评论信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /userComment/deleteUserComment [delete]
export const deleteUserCommentByIds = (params) => {
  return service({
    url: '/userComment/deleteUserCommentByIds',
    method: 'delete',
    params
  })
}

// @Tags UserComment
// @Summary 更新评论信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UserComment true "更新评论信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /userComment/updateUserComment [put]
export const updateUserComment = (data) => {
  return service({
    url: '/userComment/updateUserComment',
    method: 'put',
    data
  })
}

// @Tags UserComment
// @Summary 用id查询评论信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.UserComment true "用id查询评论信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /userComment/findUserComment [get]
export const findUserComment = (params) => {
  return service({
    url: '/userComment/findUserComment',
    method: 'get',
    params
  })
}

// @Tags UserComment
// @Summary 分页获取评论信息列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取评论信息列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /userComment/getUserCommentList [get]
export const getUserCommentList = (params) => {
  return service({
    url: '/userComment/getUserCommentList',
    method: 'get',
    params
  })
}
